home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1998 March / Pc Users extra 6.iso / pshare95 / prog / formula1 / vcform1.z / Objects.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-10-21  |  44.2 KB  |  1,390 lines

  1. VERSION 5.00
  2. Object = "{13E51000-A52B-11D0-86DA-00608CB9FBFB}#5.0#0"; "VCF15.OCX"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Objects"
  5.    ClientHeight    =   9045
  6.    ClientLeft      =   165
  7.    ClientTop       =   450
  8.    ClientWidth     =   9555
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   9045
  11.    ScaleWidth      =   9555
  12.    StartUpPosition =   2  'CenterScreen
  13.    Begin VB.Frame Button 
  14.       Caption         =   "Button"
  15.       Height          =   720
  16.       Left            =   5880
  17.       TabIndex        =   58
  18.       Top             =   4980
  19.       Width           =   1785
  20.       Begin VB.CommandButton btnbtnObjText 
  21.          Caption         =   "ObjText"
  22.          Height          =   300
  23.          Left            =   195
  24.          TabIndex        =   59
  25.          Top             =   285
  26.          Width           =   1380
  27.       End
  28.    End
  29.    Begin VB.Frame Frame6 
  30.       Caption         =   "Picture"
  31.       Height          =   2190
  32.       Left            =   7740
  33.       TabIndex        =   32
  34.       Top             =   4965
  35.       Width           =   1800
  36.       Begin VB.PictureBox Picture2 
  37.          Height          =   630
  38.          Left            =   1005
  39.          Picture         =   "Objects.frx":0000
  40.          ScaleHeight     =   570
  41.          ScaleWidth      =   615
  42.          TabIndex        =   62
  43.          Top             =   1380
  44.          Width           =   675
  45.       End
  46.       Begin VB.PictureBox Picture1 
  47.          Height          =   630
  48.          Left            =   210
  49.          Picture         =   "Objects.frx":08C4
  50.          ScaleHeight     =   570
  51.          ScaleWidth      =   615
  52.          TabIndex        =   61
  53.          Top             =   1410
  54.          Width           =   675
  55.       End
  56.       Begin VB.CommandButton btnObjCreatePicture 
  57.          Caption         =   "ObjCreatePicture"
  58.          Height          =   300
  59.          Left            =   90
  60.          TabIndex        =   35
  61.          Top             =   255
  62.          Width           =   1620
  63.       End
  64.       Begin VB.CommandButton btnObjNewPicture 
  65.          Caption         =   "ObjNewPicture"
  66.          Height          =   300
  67.          Left            =   90
  68.          TabIndex        =   34
  69.          Top             =   600
  70.          Width           =   1620
  71.       End
  72.       Begin VB.CommandButton btnObjSetPicture 
  73.          Caption         =   "ObjSetPicture"
  74.          Height          =   330
  75.          Left            =   90
  76.          TabIndex        =   33
  77.          Top             =   945
  78.          Width           =   1620
  79.       End
  80.    End
  81.    Begin VB.Frame Frame5 
  82.       Caption         =   "Polygon"
  83.       Height          =   1395
  84.       Left            =   5880
  85.       TabIndex        =   26
  86.       Top             =   5760
  87.       Width           =   1800
  88.       Begin VB.CommandButton btnObjSetPolygonPoints 
  89.          Caption         =   "ObjSetPolygonPoints"
  90.          Height          =   330
  91.          Left            =   90
  92.          TabIndex        =   29
  93.          Top             =   945
  94.          Width           =   1620
  95.       End
  96.       Begin VB.CommandButton btnObjNewPolygon 
  97.          Caption         =   "ObjNewPolygon"
  98.          Height          =   300
  99.          Left            =   90
  100.          TabIndex        =   28
  101.          Top             =   600
  102.          Width           =   1620
  103.       End
  104.       Begin VB.CommandButton btnObjCreatePolygon 
  105.          Caption         =   "ObjCreatePolygon"
  106.          Height          =   300
  107.          Left            =   90
  108.          TabIndex        =   27
  109.          Top             =   255
  110.          Width           =   1620
  111.       End
  112.    End
  113.    Begin VB.Frame Frame4 
  114.       Caption         =   "Objects"
  115.       Height          =   4575
  116.       Left            =   45
  117.       TabIndex        =   23
  118.       Top             =   4365
  119.       Width           =   4020
  120.       Begin VB.CommandButton btnObjVisible 
  121.          Caption         =   "ObjVisible"
  122.          Height          =   300
  123.          Left            =   2460
  124.          TabIndex        =   66
  125.          Top             =   4200
  126.          Width           =   1470
  127.       End
  128.       Begin VB.CommandButton btnObjPatternStyle 
  129.          Caption         =   "ObjPatternStyle"
  130.          Height          =   300
  131.          Left            =   90
  132.          TabIndex        =   65
  133.          Top             =   4200
  134.          Width           =   1740
  135.       End
  136.       Begin VB.CommandButton btnObjPatternFG 
  137.          Caption         =   "ObjPatternFG"
  138.          Height          =   300
  139.          Left            =   90
  140.          TabIndex        =   64
  141.          Top             =   3855
  142.          Width           =   1740
  143.       End
  144.       Begin VB.CommandButton btnObjPatternBG 
  145.          Caption         =   "ObjPatternBG"
  146.          Height          =   300
  147.          Left            =   90
  148.          TabIndex        =   63
  149.          Top             =   3525
  150.          Width           =   1740
  151.       End
  152.       Begin VB.CommandButton btnObjGetPosEx 
  153.          Caption         =   "ObjGetPosEx"
  154.          Height          =   300
  155.          Left            =   2460
  156.          TabIndex        =   53
  157.          Top             =   945
  158.          Width           =   1470
  159.       End
  160.       Begin VB.CommandButton btnObjNameToID 
  161.          Caption         =   "ObjNameToID"
  162.          Height          =   300
  163.          Left            =   90
  164.          TabIndex        =   52
  165.          Top             =   2430
  166.          Width           =   1215
  167.       End
  168.       Begin VB.CommandButton btnObjFirstID 
  169.          Caption         =   "ObjFirstID"
  170.          Height          =   300
  171.          Left            =   90
  172.          TabIndex        =   51
  173.          Top             =   2775
  174.          Width           =   1215
  175.       End
  176.       Begin VB.CommandButton btnObjNextID 
  177.          Caption         =   "ObjNextID"
  178.          Height          =   300
  179.          Left            =   90
  180.          TabIndex        =   50
  181.          Top             =   3120
  182.          Width           =   1215
  183.       End
  184.       Begin VB.CommandButton btnObjBringToFront 
  185.          Caption         =   "ObjBringToFront"
  186.          Height          =   300
  187.          Left            =   2460
  188.          TabIndex        =   49
  189.          Top             =   3180
  190.          Width           =   1470
  191.       End
  192.       Begin VB.CommandButton btnObjSendToBack 
  193.          Caption         =   "ObjSendToBack"
  194.          Height          =   300
  195.          Left            =   2460
  196.          TabIndex        =   48
  197.          Top             =   3525
  198.          Width           =   1470
  199.       End
  200.       Begin VB.CommandButton btnObjOptionsDlg 
  201.          Caption         =   "ObjOptionsDlg"
  202.          Height          =   300
  203.          Left            =   2460
  204.          TabIndex        =   47
  205.          Top             =   2760
  206.          Width           =   1470
  207.       End
  208.       Begin VB.CommandButton btnObjNameDlg 
  209.          Caption         =   "ObjNameDlg"
  210.          Height          =   300
  211.          Left            =   2460
  212.          TabIndex        =   46
  213.          Top             =   2415
  214.          Width           =   1470
  215.       End
  216.       Begin VB.CommandButton btnObjGetSelection 
  217.          Caption         =   "ObjGetSelection"
  218.          Height          =   300
  219.          Left            =   90
  220.          TabIndex        =   45
  221.          Top             =   1005
  222.          Width           =   1740
  223.       End
  224.       Begin VB.CommandButton btnObjSetSelection 
  225.          Caption         =   "ObjSetSelection"
  226.          Height          =   300
  227.          Left            =   90
  228.          TabIndex        =   44
  229.          Top             =   1335
  230.          Width           =   1740
  231.       End
  232.       Begin VB.CommandButton btnObjAddSelection 
  233.          Caption         =   "ObjAddSelection"
  234.          Height          =   300
  235.          Left            =   90
  236.          TabIndex        =   43
  237.          Top             =   1680
  238.          Width           =   1740
  239.       End
  240.       Begin VB.CommandButton btnObjGetSelectionCount 
  241.          Caption         =   "ObjGetSelectionCount"
  242.          Height          =   300
  243.          Left            =   90
  244.          TabIndex        =   42
  245.          Top             =   2025
  246.          Width           =   1740
  247.       End
  248.       Begin VB.CommandButton btnObjGetType 
  249.          Caption         =   "ObjGetType"
  250.          Height          =   300
  251.          Left            =   1260
  252.          TabIndex        =   41
  253.          Top             =   270
  254.          Width           =   1050
  255.       End
  256.       Begin VB.CommandButton btnObjPosToTwipsEx 
  257.          Caption         =   "ObjPosToTwipsEx"
  258.          Height          =   300
  259.          Left            =   2460
  260.          TabIndex        =   40
  261.          Top             =   1995
  262.          Width           =   1470
  263.       End
  264.       Begin VB.CommandButton btnObjPosToTwips 
  265.          Caption         =   "ObjPosToTwips"
  266.          Height          =   300
  267.          Left            =   2460
  268.          TabIndex        =   39
  269.          Top             =   1650
  270.          Width           =   1470
  271.       End
  272.       Begin VB.CommandButton btnObjPosShown 
  273.          Caption         =   "ObjPosShown"
  274.          Height          =   300
  275.          Left            =   2460
  276.          TabIndex        =   38
  277.          Top             =   1305
  278.          Width           =   1470
  279.       End
  280.       Begin VB.CommandButton btnObjGetPos 
  281.          Caption         =   "ObjGetPos"
  282.          Height          =   300
  283.          Left            =   2460
  284.          TabIndex        =   37
  285.          Top             =   600
  286.          Width           =   1470
  287.       End
  288.       Begin VB.CommandButton btnObjSetPos 
  289.          Caption         =   "ObjSetPos"
  290.          Height          =   300
  291.          Left            =   2460
  292.          TabIndex        =   36
  293.          Top             =   255
  294.          Width           =   1470
  295.       End
  296.       Begin VB.CommandButton btnObjNew 
  297.          Caption         =   "ObjNew"
  298.          Height          =   300
  299.          Left            =   90
  300.          TabIndex        =   25
  301.          Top             =   615
  302.          Width           =   1050
  303.       End
  304.       Begin VB.CommandButton btnObjCreate 
  305.          Caption         =   "ObjCreate"
  306.          Height          =   300
  307.          Left            =   90
  308.          TabIndex        =   24
  309.          Top             =   270
  310.          Width           =   1050
  311.       End
  312.    End
  313.    Begin VB.Frame Frame3 
  314.       Caption         =   "CheckBox"
  315.       Height          =   2145
  316.       Left            =   4245
  317.       TabIndex        =   20
  318.       Top             =   4995
  319.       Width           =   1575
  320.       Begin VB.CommandButton btnObjText 
  321.          Caption         =   "ObjText"
  322.          Height          =   300
  323.          Left            =   90
  324.          TabIndex        =   57
  325.          Top             =   1410
  326.          Width           =   1380
  327.       End
  328.       Begin VB.CommandButton btnObjValue 
  329.          Caption         =   "ObjValue"
  330.          Height          =   300
  331.          Left            =   90
  332.          TabIndex        =   56
  333.          Top             =   1785
  334.          Width           =   1380
  335.       End
  336.       Begin VB.CommandButton btnchkObjCellType 
  337.          Caption         =   "ObjCellType"
  338.          Height          =   300
  339.          Left            =   90
  340.          TabIndex        =   31
  341.          Top             =   990
  342.          Width           =   1380
  343.       End
  344.       Begin VB.CommandButton btnchkObjGetCell 
  345.          Caption         =   "ObjGetCell"
  346.          Height          =   300
  347.          Left            =   90
  348.          TabIndex        =   22
  349.          Top             =   630
  350.          Width           =   1380
  351.       End
  352.       Begin VB.CommandButton btnchkObjSetCell 
  353.          Caption         =   "ObjSetCell"
  354.          Height          =   300
  355.          Left            =   90
  356.          TabIndex        =   21
  357.          Top             =   285
  358.          Width           =   1380
  359.       End
  360.    End
  361.    Begin VB.Frame Frame2 
  362.       Caption         =   "ComboBox"
  363.       Height          =   1695
  364.       Left            =   4230
  365.       TabIndex        =   11
  366.       Top             =   7260
  367.       Width           =   4605
  368.       Begin VB.CommandButton Command1 
  369.          Caption         =   "ObjValue"
  370.          Height          =   300
  371.          Left            =   1575
  372.          TabIndex        =   60
  373.          Top             =   630
  374.          Width           =   1380
  375.       End
  376.       Begin VB.CommandButton btnObjItems 
  377.          Caption         =   "ObjItems"
  378.          Height          =   300
  379.          Left            =   1575
  380.          TabIndex        =   55
  381.          Top             =   1320
  382.          Width           =   1380
  383.       End
  384.       Begin VB.CommandButton btnObjItem 
  385.          Caption         =   "ObjItem"
  386.          Height          =   300
  387.          Left            =   1575
  388.          TabIndex        =   54
  389.          Top             =   975
  390.          Width           =   1380
  391.       End
  392.       Begin VB.CommandButton btnObjCellTyp 
  393.          Caption         =   "ObjCellType"
  394.          Height          =   300
  395.          Left            =   1575
  396.          TabIndex        =   30
  397.          Top             =   285
  398.          Width           =   1380
  399.       End
  400.       Begin VB.CommandButton btnObjCellCol 
  401.          Caption         =   "ObjCellCol"
  402.          Height          =   300
  403.          Left            =   3060
  404.          TabIndex        =   19
  405.          Top             =   1320
  406.          Width           =   1380
  407.       End
  408.       Begin VB.CommandButton btnObjCellRow 
  409.          Caption         =   "ObjCellRow"
  410.          Height          =   300
  411.          Left            =   3060
  412.          TabIndex        =   18
  413.          Top             =   975
  414.          Width           =   1380
  415.       End
  416.       Begin VB.CommandButton btnObjSetCell 
  417.          Caption         =   "ObjSetCell"
  418.          Height          =   300
  419.          Left            =   3060
  420.          TabIndex        =   17
  421.          Top             =   285
  422.          Width           =   1380
  423.       End
  424.       Begin VB.CommandButton btnObjGetCell 
  425.          Caption         =   "ObjGetCell"
  426.          Height          =   300
  427.          Left            =   3060
  428.          TabIndex        =   16
  429.          Top             =   630
  430.          Width           =   1380
  431.       End
  432.       Begin VB.CommandButton btnObjGetItemCount 
  433.          Caption         =   "ObjGetItemCount"
  434.          Height          =   300
  435.          Left            =   90
  436.          TabIndex        =   15
  437.          Top             =   1320
  438.          Width           =   1380
  439.       End
  440.       Begin VB.CommandButton btnObjAddItem 
  441.          Caption         =   "ObjAddItem"
  442.          Height          =   300
  443.          Left            =   90
  444.          TabIndex        =   14
  445.          Top             =   285
  446.          Width           =   1380
  447.       End
  448.       Begin VB.CommandButton btnObjDeleteItem 
  449.          Caption         =   "ObjDeleteItem"
  450.          Height          =   300
  451.          Left            =   90
  452.          TabIndex        =   13
  453.          Top             =   630
  454.          Width           =   1380
  455.       End
  456.       Begin VB.CommandButton btnObjInsertItem 
  457.          Caption         =   "ObjInsertItem"
  458.          Height          =   300
  459.          Left            =   90
  460.          TabIndex        =   12
  461.          Top             =   975
  462.          Width           =   1380
  463.       End
  464.    End
  465.    Begin VB.Frame Frame1 
  466.       Height          =   600
  467.       Left            =   0
  468.       TabIndex        =   1
  469.       Top             =   -60
  470.       Width           =   9540
  471.       Begin VB.CommandButton btnChart 
  472.          Height          =   375
  473.          Left            =   3585
  474.          Picture         =   "Objects.frx":39A6
  475.          Style           =   1  'Graphical
  476.          TabIndex        =   10
  477.          Top             =   165
  478.          Width           =   435
  479.       End
  480.       Begin VB.CommandButton btnCombobox 
  481.          Height          =   375
  482.          Left            =   3165
  483.          Picture         =   "Objects.frx":4048
  484.          Style           =   1  'Graphical
  485.          TabIndex        =   9
  486.          Top             =   165
  487.          Width           =   435
  488.       End
  489.       Begin VB.CommandButton btnCheckbox 
  490.          Height          =   375
  491.          Left            =   2745
  492.          Picture         =   "Objects.frx":46EA
  493.          Style           =   1  'Graphical
  494.          TabIndex        =   8
  495.          Top             =   165
  496.          Width           =   435
  497.       End
  498.       Begin VB.CommandButton btnButton 
  499.          Height          =   375
  500.          Left            =   2325
  501.          Picture         =   "Objects.frx":4D8C
  502.          Style           =   1  'Graphical
  503.          TabIndex        =   7
  504.          Top             =   165
  505.          Width           =   435
  506.       End
  507.       Begin VB.CommandButton btnPolygon 
  508.          Height          =   375
  509.          Left            =   1800
  510.          Picture         =   "Objects.frx":542E
  511.          Style           =   1  'Graphical
  512.          TabIndex        =   6
  513.          Top             =   165
  514.          Width           =   435
  515.       End
  516.       Begin VB.CommandButton btnArc 
  517.          Height          =   375
  518.          Left            =   1380
  519.          Picture         =   "Objects.frx":5AD0
  520.          Style           =   1  'Graphical
  521.          TabIndex        =   5
  522.          Top             =   165
  523.          Width           =   435
  524.       End
  525.       Begin VB.CommandButton btnOval 
  526.          Height          =   375
  527.          Left            =   960
  528.          Picture         =   "Objects.frx":6172
  529.          Style           =   1  'Graphical
  530.          TabIndex        =   4
  531.          Top             =   165
  532.          Width           =   435
  533.       End
  534.       Begin VB.CommandButton btnRectangle 
  535.          Height          =   375
  536.          Left            =   540
  537.          Picture         =   "Objects.frx":6814
  538.          Style           =   1  'Graphical
  539.          TabIndex        =   3
  540.          Top             =   165
  541.          Width           =   435
  542.       End
  543.       Begin VB.CommandButton btnLine 
  544.          Height          =   375
  545.          Left            =   120
  546.          Picture         =   "Objects.frx":6EB6
  547.          Style           =   1  'Graphical
  548.          TabIndex        =   2
  549.          Top             =   165
  550.          Width           =   435
  551.       End
  552.    End
  553.    Begin VCF150Ctl.F1Book F1Book1 
  554.       Height          =   3660
  555.       Left            =   15
  556.       TabIndex        =   0
  557.       Top             =   585
  558.       Width           =   9525
  559.       _ExtentX        =   16801
  560.       _ExtentY        =   6456
  561.       _0              =   $"Objects.frx":7558
  562.       _1              =   $"Objects.frx":795D
  563.       _2              =   $"Objects.frx":7D62
  564.       _3              =   $"Objects.frx":8167
  565.       _4              =   $"Objects.frx":856C
  566.       _count          =   5
  567.       _ver            =   1
  568.    End
  569.    Begin VB.Menu mnuObjects 
  570.       Caption         =   "&Objects"
  571.       Begin VB.Menu mnuOptions 
  572.          Caption         =   "&Options..."
  573.       End
  574.    End
  575. Attribute VB_Name = "Form1"
  576. Attribute VB_GlobalNameSpace = False
  577. Attribute VB_Creatable = False
  578. Attribute VB_PredeclaredId = True
  579. Attribute VB_Exposed = False
  580. Private Sub btnArc_Click()
  581.     F1Book1.Mode = F1ModeArc
  582. End Sub
  583. Private Sub btnbtnObjText_Click()
  584.     Dim ObjID As Long
  585.     On Error GoTo ObjNotFoundErr
  586.     ObjID = F1Book1.ObjSelection(0)
  587.     F1Book1.ObjText(ObjID) = InputBox("Change the text from " & F1Book1.ObjText(ObjID) & " to:")
  588.     Exit Sub
  589. ObjNotFoundErr:
  590.     MsgBox "A Checkbox or button object must be selected."
  591. End Sub
  592. Private Sub btnButton_Click()
  593.     F1Book1.Mode = F1ModeButton
  594. End Sub
  595. Private Sub btnChart_Click()
  596.     F1Book1.Mode = F1ModeChart
  597. End Sub
  598. Private Sub btnCheckbox_Click()
  599.     F1Book1.Mode = F1ModeCheckBox
  600. End Sub
  601. Private Sub btnchkObjCellType_Click()
  602.     Dim ObjID As Long
  603.     On Error GoTo ObjNotFoundErr
  604.         
  605.     F1Book1.ObjGetSelection 0, ObjID
  606.     If F1Book1.ObjGetType(ObjID) = F1ObjCheckBox Then
  607.         If F1Book1.ObjCellType(ObjID) = F1ControlCellText Then
  608.             MsgBox "Combo text appears in the cell."
  609.         ElseIf F1Book1.ObjCellType(ObjID) = F1ControlCellValue Then
  610.             MsgBox "Combo value appears in the cell."
  611.         ElseIf F1Book1.ObjCellType(ObjID) = F1ControlNoCell Then
  612.             MsgBox "Neither text nor value is diplayed."
  613.         End If
  614.     Else
  615.         GoTo ObjNotFoundErr
  616.     End If
  617.     Exit Sub
  618. ObjNotFoundErr:
  619.     MsgBox "A CheckBox object is not selected."
  620. End Sub
  621. Private Sub btnchkObjGetCell_Click()
  622.     Dim ObjID As Long
  623.     Dim pHasCell As Integer
  624.     Dim pRow As Long
  625.     Dim pCol As Long
  626.     On Error GoTo ObjNotFoundErr
  627.     F1Book1.ObjGetSelection 0, ObjID
  628.     If F1Book1.ObjGetType(ObjID) = F1ObjCheckBox Then
  629.         F1Book1.ObjGetCell ObjID, pHasCell, pRow, pCol
  630.         MsgBox "CheckBox results appear in row " & pRow & " and column " & pCol
  631.     Else
  632.         GoTo ObjNotFoundErr
  633.     End If
  634.     Exit Sub
  635. ObjNotFoundErr:
  636.     MsgBox "A CheckBox object is not selected."
  637. End Sub
  638. Private Sub btnchkObjSetCell_Click()
  639.     Dim ObjID As Long
  640.     Dim CellType As Integer
  641.     Dim nRow As Long
  642.     Dim nCol As Long
  643.     On Error GoTo ObjNotFoundErr
  644.     F1Book1.ObjGetSelection 0, ObjID
  645.     If F1Book1.ObjGetType(ObjID) = F1ObjCheckBox Then
  646.         CellType = 2
  647.         nRow = InputBox("Enter the Row:")
  648.         nCol = InputBox("Enter the Column:")
  649.         F1Book1.ObjSetCell ObjID, CellType, nRow, nCol
  650.     Else
  651.         GoTo ObjNotFoundErr
  652.     End If
  653.     Exit Sub
  654. ObjNotFoundErr:
  655.     MsgBox "A CheckBox object is not selected."
  656. End Sub
  657. Private Sub btnCombobox_Click()
  658.     F1Book1.Mode = F1ModeDropDown
  659. End Sub
  660. Private Sub btnLine_Click()
  661.     F1Book1.Mode = F1ModeLine
  662. End Sub
  663. Private Sub btnObjAddItem_Click()
  664.     Dim ObjID As Long
  665.     Dim ItemText As String
  666.     On Error GoTo ObjNotFoundErr
  667.     F1Book1.ObjGetSelection 0, ObjID
  668.     If F1Book1.ObjGetType(ObjID) = F1ObjDropDown Then
  669.         ItemText = InputBox("Enter Item to Add:")
  670.         F1Book1.ObjAddItem ObjID, ItemText
  671.     Else
  672.         GoTo ObjNotFoundErr
  673.     End If
  674.     Exit Sub
  675. ObjNotFoundErr:
  676.     MsgBox "A ComboBox object is not selected."
  677. End Sub
  678. Private Sub btnObjAddSelection_Click()
  679.     Dim ObjID As Long
  680.     On Error GoTo ObjNotFoundErr
  681.     ObjID = InputBox("Enter the ObjID of the object you wish to add to the selection.")
  682.     F1Book1.ObjAddSelection ObjID
  683.     Exit Sub
  684. ObjNotFoundErr:
  685.     MsgBox "That object was not found."
  686. End Sub
  687. Private Sub btnObjBringToFront_Click()
  688.     On Error GoTo ObjNotFoundErr
  689.         
  690.     F1Book1.ObjBringToFront
  691.     Exit Sub
  692. ObjNotFoundErr:
  693.     MsgBox "An object must be selected."
  694. End Sub
  695. Private Sub btnObjCellCol_Click()
  696.     Dim ObjID As Long
  697.     On Error GoTo ObjNotFoundErr
  698.         
  699.     F1Book1.ObjGetSelection 0, ObjID
  700.     If F1Book1.ObjGetType(ObjID) = F1ObjDropDown Then
  701.         MsgBox "Combo results appears in column " & F1Book1.ObjCellCol(ObjID)
  702.     Else
  703.         GoTo ObjNotFoundErr
  704.     End If
  705.     Exit Sub
  706. ObjNotFoundErr:
  707.     MsgBox "A ComboBox object is not selected."
  708. End Sub
  709. Private Sub btnObjCellRow_Click()
  710.     Dim ObjID As Long
  711.     On Error GoTo ObjNotFoundErr
  712.         
  713.     F1Book1.ObjGetSelection 0, ObjID
  714.     If F1Book1.ObjGetType(ObjID) = F1ObjDropDown Then
  715.         MsgBox "Combo results appears in row " & F1Book1.ObjCellRow(ObjID)
  716.     Else
  717.         GoTo ObjNotFoundErr
  718.     End If
  719.     Exit Sub
  720. ObjNotFoundErr:
  721.     MsgBox "A ComboBox object is not selected."
  722. End Sub
  723. Private Sub btnObjCellTyp_Click()
  724.     Dim ObjID As Long
  725.     On Error GoTo ObjNotFoundErr
  726.         
  727.     F1Book1.ObjGetSelection 0, ObjID
  728.     If F1Book1.ObjGetType(ObjID) = F1ObjDropDown Then
  729.         If F1Book1.ObjCellType(ObjID) = F1ControlCellText Then
  730.             MsgBox "Combo text appears in the cell."
  731.         ElseIf F1Book1.ObjCellType(ObjID) = F1ControlCellValue Then
  732.             MsgBox "Combo value appears in the cell."
  733.         ElseIf F1Book1.ObjCellType(ObjID) = F1ControlNoCell Then
  734.             MsgBox "Neither text nor value is diplayed."
  735.         End If
  736.     Else
  737.         GoTo ObjNotFoundErr
  738.     End If
  739.     Exit Sub
  740. ObjNotFoundErr:
  741.     MsgBox "A ComboBox object is not selected."
  742. End Sub
  743. Private Sub btnObjCreate_Click()
  744.     Dim ObjID As Long
  745.     Form3.Show 1
  746.     Select Case F1Book1.Tag
  747.         Case "Line"
  748.             ObjType = F1ObjLine
  749.         Case "Rectangle"
  750.             ObjType = F1ObjRectangle
  751.         Case "Oval"
  752.             ObjType = F1ObjOval
  753.         Case "Arc"
  754.             ObjType = F1ObjArc
  755.         Case "Button"
  756.             ObjType = F1ObjButton
  757.         Case "CheckBox"
  758.             ObjType = F1ObjCheckBox
  759.         Case "ComboBox"
  760.             ObjType = F1ObjDropDown
  761.         Case "Chart"
  762.             ObjType = F1ObjChart
  763.         Case "Cancel"
  764.             Exit Sub
  765.     End Select
  766.     nX1 = 1
  767.     nY1 = 1
  768.     nX2 = 3
  769.     nY2 = 3
  770.     ObjID = F1Book1.ObjCreate(ObjType, nX1, nY1, nX2, nY2)
  771. End Sub
  772. Private Sub btnObjCreatePicture_Click()
  773.     Dim ObjID As Long
  774.     Dim nX1 As Single
  775.     Dim nY1 As Single
  776.     Dim nX2 As Single
  777.     Dim nY2 As Single
  778.     Dim hMF As OLE_HANDLE
  779.     Dim nMapMode As Long
  780.     Dim nWndExtentX As Long
  781.     Dim nWndExtentY As Long
  782.     Dim MapMode As Integer
  783.     nX1 = 1
  784.     nY1 = 7
  785.     nX2 = 4
  786.     nY2 = 12
  787.     MapMode = MsgBox("Do you wish to strecth the image to fit?", vbYesNo)
  788.     If MapMode = vbYes Then
  789.         nMapMode = 8
  790.     Else
  791.         nMapMode = 7
  792.     End If
  793.     hMF = Picture1.Picture
  794.     nWndExtentX = Picture1.ScaleWidth
  795.     nWndExtentY = Picture1.ScaleHeight
  796.     ObjID = F1Book1.ObjCreatePicture(nX1, nY1, nX2, nY2, hMF, nMapMode, nWndExtentX, nWndExtentY)
  797. End Sub
  798. Private Sub btnObjCreatePolygon_Click()
  799.     Dim ObjID As Long
  800.     Dim X1 As Single
  801.     Dim Y1 As Single
  802.     Dim X2 As Single
  803.     Dim Y2 As Single
  804.     Dim ArrayX(5) As Variant
  805.     Dim ArrayY(5) As Variant
  806.     Dim pClosed As Boolean
  807.     X1 = 1
  808.     Y1 = 1
  809.     X2 = 5
  810.     Y2 = 5
  811.     ArrayX(1) = 1
  812.     ArrayX(2) = 8000
  813.     ArrayX(3) = 15000
  814.     ArrayX(4) = 16000
  815.     ArrayX(5) = 4000
  816.     ArrayY(1) = 1
  817.     ArrayY(2) = 10000
  818.     ArrayY(3) = 13000
  819.     ArrayY(4) = 11000
  820.     ArrayY(5) = 800
  821.     pClosed = True
  822.     ObjID = F1Book1.ObjCreatePolygon(X1, Y1, X2, Y2, ArrayX, ArrayY, pClosed)
  823. End Sub
  824. Private Sub btnObjDeleteItem_Click()
  825.     Dim ObjID As Long
  826.     On Error GoTo ObjNotFoundErr
  827.     If F1Book1.ObjGetItemCount(F1Book1.ObjSelection(0)) = 0 Then
  828.         MsgBox "No Items to Delete."
  829.         Exit Sub
  830.     End If
  831.     F1Book1.ObjGetSelection 0, ObjID
  832.     If F1Book1.ObjGetType(ObjID) = F1ObjDropDown Then
  833.         Form2.Show 1
  834.         If F1Book1.Tag = "Cancel" Or F1Book1.Tag = -1 Then
  835.             Exit Sub
  836.         Else
  837.             F1Book1.ObjDeleteItem ObjID, F1Book1.Tag
  838.         End If
  839.     Else
  840.         GoTo ObjNotFoundErr
  841.     End If
  842.     Exit Sub
  843. ObjNotFoundErr:
  844.     MsgBox "A ComboBox object is not selected."
  845. End Sub
  846. Private Sub btnObjFirstID_Click()
  847.     On Error GoTo ObjNotFoundErr
  848.     MsgBox "The ID of the first object is " & F1Book1.ObjFirstID
  849.     Exit Sub
  850. ObjNotFoundErr:
  851.     MsgBox "No objects available."
  852. End Sub
  853. Private Sub btnObjGetCell_Click()
  854.     Dim ObjID As Long
  855.     Dim pHasCell As Integer
  856.     Dim pRow As Long
  857.     Dim pCol As Long
  858.     On Error GoTo ObjNotFoundErr
  859.     F1Book1.ObjGetSelection 0, ObjID
  860.     If F1Book1.ObjGetType(ObjID) = F1ObjDropDown Then
  861.         F1Book1.ObjGetCell ObjID, pHasCell, pRow, pCol
  862.         MsgBox "Combo results appear in row " & pRow & " and column " & pCol
  863.     Else
  864.         GoTo ObjNotFoundErr
  865.     End If
  866.     Exit Sub
  867. ObjNotFoundErr:
  868.     MsgBox "A ComboBox object is not selected."
  869. End Sub
  870. Private Sub btnObjGetItemCount_Click()
  871.     Dim ObjID As Long
  872.     On Error GoTo ObjNotFoundErr
  873.     F1Book1.ObjGetSelection 0, ObjID
  874.     If F1Book1.ObjGetType(ObjID) = F1ObjDropDown Then
  875.         MsgBox "Combo has " & Str(F1Book1.ObjGetItemCount(ObjID)) & " items."
  876.     Else
  877.         GoTo ObjNotFoundErr
  878.     End If
  879.     Exit Sub
  880. ObjNotFoundErr:
  881.     MsgBox "A ComboBox object is not selected."
  882. End Sub
  883. Private Sub btnObjGetPos_Click()
  884.     Dim ObjID As Long
  885.     Dim pX1 As Single
  886.     Dim pY1 As Single
  887.     Dim pX2 As Single
  888.     Dim pY2 As Single
  889.     On Error GoTo ObjNotFoundErr
  890.     ObjID = F1Book1.ObjSelection(0)
  891.         
  892.     F1Book1.ObjGetPos ObjID, pX1, pY1, pX2, pY2
  893.     MsgBox "Objects top row is: " & pY1
  894.     MsgBox "Objects left column is: " & pX1
  895.     MsgBox "Objects bottom row is: " & pY2
  896.     MsgBox "Objects right column is: " & pX2
  897.     Exit Sub
  898. ObjNotFoundErr:
  899.     MsgBox "An object must be selected first."
  900. End Sub
  901. Private Sub btnObjGetPosEx_Click()
  902.     Dim ObjID As Long
  903.     Dim F1Pos As F1ObjPos
  904.     On Error GoTo ObjNotFoundErr
  905.     ObjID = F1Book1.ObjSelection(0)
  906.         
  907.     Set F1Pos = F1Book1.ObjGetPosEx(ObjID)
  908.     MsgBox "Objects top row is: " & F1Pos.StartRow
  909.     MsgBox "Objects left column is: " & F1Pos.StartCol
  910.     MsgBox "Objects bottom row is: " & F1Pos.EndRow
  911.     MsgBox "Objects right column is: " & F1Pos.EndCol
  912.     Exit Sub
  913. ObjNotFoundErr:
  914.     MsgBox "An object must be selected first."
  915. End Sub
  916. Private Sub btnObjGetSelection_Click()
  917.     Dim nSelection As Integer
  918.     Dim pID As Long
  919.     Dim x As Integer
  920.     On Error GoTo ObjNotFoundErr
  921.     For x = 0 To F1Book1.ObjGetSelectionCount - 1
  922.         nSelection = x
  923.         F1Book1.ObjGetSelection nSelection, pID
  924.         MsgBox "Object selection index " & nSelection & " is ObjID " & pID
  925.     Next x
  926.     Exit Sub
  927. ObjNotFoundErr:
  928.     MsgBox "Not objects were selected."
  929. End Sub
  930. Private Sub btnObjGetSelectionCount_Click()
  931.     Dim nSelection As Integer
  932.     Dim pID As Long
  933.     Dim x As Integer
  934.     On Error GoTo ObjNotFoundErr
  935.     nSelection = F1Book1.ObjGetSelectionCount
  936.     MsgBox nSelection & " items selected."
  937.     Exit Sub
  938. ObjNotFoundErr:
  939.     MsgBox "Not objects were selected."
  940. End Sub
  941. Private Sub btnObjGetType_Click()
  942.     Dim ObjID As Long
  943.     Dim ObjType As F1ObjTypeConstants
  944.     On Error GoTo ObjNotFoundErr
  945.     ObjID = F1Book1.ObjSelection(0)
  946.     ObjType = F1Book1.ObjGetType(ObjID)
  947.     Select Case ObjType
  948.         Case F1ObjLine
  949.             MsgBox "This is a line object."
  950.         Case F1ObjRectangle
  951.             MsgBox "This is a rectangle object."
  952.         Case F1ObjOval
  953.             MsgBox "This is an oval object."
  954.         Case F1ObjArc
  955.             MsgBox "This is an arc object."
  956.         Case F1ObjButton
  957.             MsgBox "This is a button object."
  958.         Case F1ObjCheckBox
  959.             MsgBox "This is a checkbox object."
  960.         Case F1ObjDropDown
  961.             MsgBox "This is a combobox object."
  962.         Case F1ObjChart
  963.             MsgBox "This is a chart object."
  964.         Case F1ObjPicture
  965.             MsgBox "This is a picture object."
  966.         Case F1ObjPolygon
  967.             MsgBox "This is a polygon object."
  968.     End Select
  969.     Exit Sub
  970. ObjNotFoundErr:
  971.     MsgBox "An object must be selected."
  972. End Sub
  973. Private Sub btnObjInsertItem_Click()
  974.     Dim ObjID As Long
  975.     Dim ItemText As String
  976.     On Error GoTo ObjNotFoundErr
  977.     F1Book1.ObjGetSelection 0, ObjID
  978.     If F1Book1.ObjGetType(ObjID) = F1ObjDropDown Then
  979.         ItemText = InputBox("Enter Item to Add:")
  980.         F1Book1.ObjInsertItem ObjID, 0, ItemText
  981.     Else
  982.         GoTo ObjNotFoundErr
  983.     End If
  984.     Exit Sub
  985. ObjNotFoundErr:
  986.     MsgBox "A ComboBox object is not selected."
  987. End Sub
  988. Private Sub btnObjItem_Click()
  989.     Dim ItemText As String
  990.     Dim ObjID As Long
  991.     On Error GoTo ObjNotFoundErr
  992.     ObjID = F1Book1.ObjSelection(0)
  993.     nItem = InputBox("Enter the index of the item you wish to return.")
  994.     ItemText = F1Book1.ObjItem(ObjID, nItem)
  995.     MsgBox "Item is: " & ItemText
  996.     Exit Sub
  997. ObjNotFoundErr:
  998.     MsgBox "Must have a combobox selected or choose a proper index."
  999. End Sub
  1000. Private Sub btnObjItems_Click()
  1001.     Dim ItemText As String
  1002.     Dim ObjID As Long
  1003.     On Error GoTo ObjNotFoundErr
  1004.     ObjID = F1Book1.ObjSelection(0)
  1005.         
  1006.     ItemText = F1Book1.ObjItems(ObjID)
  1007.     MsgBox "The item list is: " & ItemText
  1008.     Exit Sub
  1009. ObjNotFoundErr:
  1010.     MsgBox "Must have a combobox selected or choose a proper index."
  1011. End Sub
  1012. Private Sub btnObjNameDlg_Click()
  1013.     On Error GoTo ObjNotFoundErr
  1014.     F1Book1.ObjNameDlg
  1015.     Exit Sub
  1016. ObjNotFoundErr:
  1017.     MsgBox "An object must be selected."
  1018. End Sub
  1019. Private Sub btnObjNameToID_Click()
  1020.     Dim ObjID As Long
  1021.     Dim Name As String
  1022.     On Error GoTo ObjNotFoundErr
  1023.     Name = InputBox("Enter the name of the object.")
  1024.     ObjID = F1Book1.ObjNameToID(Name)
  1025.     MsgBox "The object " & Name & " has an ObjID of " & ObjID
  1026.     Exit Sub
  1027. ObjNotFoundErr:
  1028.     MsgBox "That object was not found."
  1029. End Sub
  1030. Private Sub btnObjNew_Click()
  1031.     Dim ObjID As Long
  1032.     Form3.Show 1
  1033.     Select Case F1Book1.Tag
  1034.         Case "Line"
  1035.             ObjType = F1ObjLine
  1036.         Case "Rectangle"
  1037.             ObjType = F1ObjRectangle
  1038.         Case "Oval"
  1039.             ObjType = F1ObjOval
  1040.         Case "Arc"
  1041.             ObjType = F1ObjArc
  1042.         Case "Button"
  1043.             ObjType = F1ObjButton
  1044.         Case "CheckBox"
  1045.             ObjType = F1ObjCheckBox
  1046.         Case "ComboBox"
  1047.             ObjType = F1ObjDropDown
  1048.         Case "Chart"
  1049.             ObjType = F1ObjChart
  1050.         Case "Cancel"
  1051.             Exit Sub
  1052.     End Select
  1053.     nX1 = 1
  1054.     nY1 = 1
  1055.     nX2 = 3
  1056.     nY2 = 3
  1057.     F1Book1.ObjNew ObjType, nX1, nY1, nX2, nY2, ObjID
  1058. End Sub
  1059. Private Sub btnObjNewPicture_Click()
  1060.     Dim ObjID As Long
  1061.     Dim nX1 As Single
  1062.     Dim nY1 As Single
  1063.     Dim nX2 As Single
  1064.     Dim nY2 As Single
  1065.     Dim hMF As OLE_HANDLE
  1066.     Dim nMapMode As Long
  1067.     Dim nWndExtentX As Long
  1068.     Dim nWndExtentY As Long
  1069.     Dim MapMode As Integer
  1070.     nX1 = 1
  1071.     nY1 = 7
  1072.     nX2 = 4
  1073.     nY2 = 12
  1074.     MapMode = MsgBox("Do you wish to strecth the image to fit?", vbYesNo)
  1075.     If MapMode = vbYes Then
  1076.         nMapMode = 8
  1077.     Else
  1078.         nMapMode = 7
  1079.     End If
  1080.     hMF = Picture1.Picture
  1081.     nWndExtentX = Picture1.ScaleWidth
  1082.     nWndExtentY = Picture1.ScaleHeight
  1083.     F1Book1.ObjNewPicture nX1, nY1, nX2, nY2, ObjID, hMF, nMapMode, nWndExtentX, nWndExtentY
  1084. End Sub
  1085. Private Sub btnObjNewPolygon_Click()
  1086.     Dim ObjID As Long
  1087.     Dim X1 As Single
  1088.     Dim Y1 As Single
  1089.     Dim X2 As Single
  1090.     Dim Y2 As Single
  1091.     Dim ArrayX(5) As Variant
  1092.     Dim ArrayY(5) As Variant
  1093.     Dim pClosed As Boolean
  1094.     X1 = 1
  1095.     Y1 = 1
  1096.     X2 = 5
  1097.     Y2 = 5
  1098.     ArrayX(1) = 1
  1099.     ArrayX(2) = 8000
  1100.     ArrayX(3) = 15000
  1101.     ArrayX(4) = 16000
  1102.     ArrayX(5) = 4000
  1103.     ArrayY(1) = 1
  1104.     ArrayY(2) = 10000
  1105.     ArrayY(3) = 13000
  1106.     ArrayY(4) = 11000
  1107.     ArrayY(5) = 800
  1108.     pClosed = True
  1109.     F1Book1.ObjNewPolygon X1, Y1, X2, Y2, ObjID, ArrayX, ArrayY, pClosed
  1110. End Sub
  1111. Private Sub btnObjNextID_Click()
  1112.     On Error GoTo ObjNotFoundErr
  1113.     MsgBox "The ID of the first object is " & F1Book1.ObjFirstID
  1114.         
  1115.     ObjCount = F1Book1.ObjFirstID
  1116.     While F1Book1.ObjNextID(ObjCount)
  1117.         MsgBox "The ID of the next object is " & F1Book1.ObjNextID(ObjCount)
  1118.         ObjCount = F1Book1.ObjNextID(ObjCount)
  1119.     Wend
  1120.     Exit Sub
  1121. ObjNotFoundErr:
  1122.     MsgBox "No more objects available."
  1123. End Sub
  1124. Private Sub btnObjOptionsDlg_Click()
  1125.     On Error GoTo ObjNotValidErr
  1126.     F1Book1.ObjOptionsDlg
  1127.     Exit Sub
  1128. ObjNotValidErr:
  1129.     MsgBox "The object is not valid for the options dialog."
  1130. End Sub
  1131. Private Sub btnObjPatternBG_Click()
  1132.     Dim Red As Integer
  1133.     Dim Green As Integer
  1134.     Dim Blue As Integer
  1135.     On Error GoTo ObjNotFoundErr
  1136.     Red = InputBox("Enter the Red value 0-255:")
  1137.     Green = InputBox("Enter the Green value 0-255:")
  1138.     Blue = InputBox("Enter the Blue value 0-255:")
  1139.     F1Book1.ObjPatternBG = RGB(Red, Green, Blue)
  1140.     Exit Sub
  1141. ObjNotFoundErr:
  1142.     MsgBox "An object must be selected."
  1143. End Sub
  1144. Private Sub btnObjPatternFG_Click()
  1145.     Dim Red As Integer
  1146.     Dim Green As Integer
  1147.     Dim Blue As Integer
  1148.     On Error GoTo ObjNotFoundErr
  1149.     Red = InputBox("Enter the Red value 0-255:")
  1150.     Green = InputBox("Enter the Green value 0-255:")
  1151.     Blue = InputBox("Enter the Blue value 0-255:")
  1152.     F1Book1.ObjPatternFG = RGB(Red, Green, Blue)
  1153.     Exit Sub
  1154. ObjNotFoundErr:
  1155.     MsgBox "An object must be selected."
  1156. End Sub
  1157. Private Sub btnObjPatternStyle_Click()
  1158.     On Error GoTo ObjNotFoundErr
  1159.     Style = InputBox("Enter the style value 1-18:")
  1160.     F1Book1.ObjPatternStyle = Style
  1161.     Exit Sub
  1162. ObjNotFoundErr:
  1163.     MsgBox "An object must be selected."
  1164. End Sub
  1165. Private Sub btnObjPosShown_Click()
  1166.     Dim ObjID As Long
  1167.     Dim pX1 As Single
  1168.     Dim pY1 As Single
  1169.     Dim pX2 As Single
  1170.     Dim pY2 As Single
  1171.     Dim Shown As Integer
  1172.     On Error GoTo ObjNotFoundErr
  1173.     ObjID = F1Book1.ObjSelection(0)
  1174.         
  1175.     F1Book1.ObjGetPos ObjID, pX1, pY1, pX2, pY2
  1176.     Shown = F1Book1.ObjPosShown(pX1, pY1, pX2, pY2)
  1177.     If Shown = 0 Then
  1178.         MsgBox "The object is not shown."
  1179.     ElseIf Shown = 1 Then
  1180.         MsgBox "The object is shown."
  1181.     Else
  1182.         MsgBox "The object is partially shown."
  1183.     End If
  1184.     Exit Sub
  1185. ObjNotFoundErr:
  1186.     MsgBox "An object must be selected first."
  1187. End Sub
  1188. Private Sub btnObjPosToTwips_Click()
  1189.     Dim ObjID As Long
  1190.     Dim pX1 As Single
  1191.     Dim pY1 As Single
  1192.     Dim pX2 As Single
  1193.     Dim pY2 As Single
  1194.     Dim pX As Long
  1195.     Dim pY As Long
  1196.     Dim pCX As Long
  1197.     Dim pCY As Long
  1198.     Dim Shown As Integer
  1199.     On Error GoTo ObjNotFoundErr
  1200.     ObjID = F1Book1.ObjSelection(0)
  1201.         
  1202.     F1Book1.ObjGetPos ObjID, pX1, pY1, pX2, pY2
  1203.     F1Book1.ObjPosToTwips pX1, pY1, pX2, pY2, pX, pY, pCX, pCY, Shown
  1204.     If Shown = 0 Then
  1205.         MsgBox "The object is not shown. Its location is at: " & pY & ", " & pX & ", Its dimensions are: " & pCY & ", " & pCX
  1206.     ElseIf Shown = 1 Then
  1207.         MsgBox "The object is shown. Its location is at: " & pY & ", " & pX & ", Its dimensions are: " & pCY & ", " & pCX
  1208.     Else
  1209.         MsgBox "The object is partially shown. Its location is at: " & pY & ", " & pX & ", Its dimensions are: " & pCY & ", " & pCX
  1210.     End If
  1211.     Exit Sub
  1212. ObjNotFoundErr:
  1213.     MsgBox "An object must be selected first."
  1214. End Sub
  1215. Private Sub btnObjPosToTwipsEx_Click()
  1216.     Dim ObjID As Long
  1217.     Dim pX1 As Single
  1218.     Dim pY1 As Single
  1219.     Dim pX2 As Single
  1220.     Dim pY2 As Single
  1221.     Dim F1Pos As F1Rect
  1222.     Dim Shown As Integer
  1223.     On Error GoTo ObjNotFoundErr
  1224.     ObjID = F1Book1.ObjSelection(0)
  1225.         
  1226.     F1Book1.ObjGetPos ObjID, pX1, pY1, pX2, pY2
  1227.     Set F1Pos = F1Book1.ObjPosToTwipsEx(pX1, pY1, pX2, pY2)
  1228.     MsgBox "The object is at: " & F1Pos.Top & ", " & F1Pos.Left & ", Its dimensions are: " & F1Pos.Height & ", " & F1Pos.Width
  1229.     Exit Sub
  1230. ObjNotFoundErr:
  1231.     MsgBox "An object must be selected first."
  1232. End Sub
  1233. Private Sub btnObjSendToBack_Click()
  1234.     On Error GoTo ObjNotFoundErr
  1235.         
  1236.     F1Book1.ObjSendToBack
  1237.     Exit Sub
  1238. ObjNotFoundErr:
  1239.     MsgBox "An object must be selected."
  1240. End Sub
  1241. Private Sub btnObjSetCell_Click()
  1242.     Dim ObjID As Long
  1243.     Dim CellType As Integer
  1244.     Dim nRow As Long
  1245.     Dim nCol As Long
  1246.     On Error GoTo ObjNotFoundErr
  1247.     F1Book1.ObjGetSelection 0, ObjID
  1248.     If F1Book1.ObjGetType(ObjID) = F1ObjDropDown Then
  1249.         CellType = 2
  1250.         nRow = InputBox("Enter the Row:")
  1251.         nCol = InputBox("Enter the Column:")
  1252.         F1Book1.ObjSetCell ObjID, CellType, nRow, nCol
  1253.     Else
  1254.         GoTo ObjNotFoundErr
  1255.     End If
  1256.     Exit Sub
  1257. ObjNotFoundErr:
  1258.     MsgBox "A ComboBox object is not selected."
  1259. End Sub
  1260. Private Sub btnObjSetPicture_Click()
  1261.     Dim ObjID As Long
  1262.     Dim hMF As OLE_HANDLE
  1263.     Dim nMapMode As Long
  1264.     Dim nWndExtentX As Long
  1265.     Dim nWndExtentY As Long
  1266.     Dim MapMode As Integer
  1267.         
  1268.     On Error GoTo ObjNotFoundErr
  1269.     ObjID = F1Book1.ObjSelection(0)
  1270.         
  1271.     MapMode = MsgBox("Do you wish to strecth the image to fit?", vbYesNo)
  1272.     If MapMode = vbYes Then
  1273.         nMapMode = 8
  1274.     Else
  1275.         nMapMode = 7
  1276.     End If
  1277.     hMF = Picture2.Picture
  1278.     nWndExtentX = Picture2.ScaleWidth
  1279.     nWndExtentY = Picture2.ScaleHeight
  1280.     F1Book1.ObjSetPicture ObjID, hMF, nMapMode, nWndExtentX, nWndExtentY
  1281.     Exit Sub
  1282. ObjNotFoundErr:
  1283.     MsgBox "A Picture control was not selected."
  1284. End Sub
  1285. Private Sub btnObjSetPolygonPoints_Click()
  1286.     Dim ObjID As Long
  1287.     Dim ArrayX(5) As Variant
  1288.     Dim ArrayY(5) As Variant
  1289.     Dim pClosed As Boolean
  1290.     X1 = 1
  1291.     Y1 = 1
  1292.     X2 = 5
  1293.     Y2 = 5
  1294.     ArrayX(1) = 1
  1295.     ArrayX(2) = 200
  1296.     ArrayX(3) = 8000
  1297.     ArrayX(4) = 6000
  1298.     ArrayX(5) = 2000
  1299.     ArrayY(1) = 1
  1300.     ArrayY(2) = 10000
  1301.     ArrayY(3) = 13000
  1302.     ArrayY(4) = 11000
  1303.     ArrayY(5) = 800
  1304.     pClosed = True
  1305.     On Error GoTo ObjNotFoundErr
  1306.     ObjID = F1Book1.ObjSelection(0)
  1307.     If F1Book1.ObjGetType(ObjID) = F1ObjPolygon Then
  1308.         F1Book1.ObjSetPolygonPoints ObjID, ArrayX, ArrayY, bClosed
  1309.     Else
  1310.         MsgBox "No Polygon was selected."
  1311.     End If
  1312.     Exit Sub
  1313. ObjNotFoundErr:
  1314.     MsgBox "No Polygon was selected."
  1315. End Sub
  1316. Private Sub btnObjSetPos_Click()
  1317.     Dim ObjID As Long
  1318.     Dim nX1 As Single
  1319.     Dim nY1 As Single
  1320.     Dim nX2 As Single
  1321.     Dim nY2 As Single
  1322.     On Error GoTo ObjNotFoundErr
  1323.     ObjID = F1Book1.ObjSelection(0)
  1324.     nY1 = InputBox("Enter row for top of object:")
  1325.     nX1 = InputBox("Enter column for left of object:")
  1326.     nY2 = InputBox("Enter row for bottom of object:")
  1327.     nX2 = InputBox("Enter column for right of object:")
  1328.     F1Book1.ObjSetPos ObjID, nX1, nY1, nX2, nY2
  1329.     Exit Sub
  1330. ObjNotFoundErr:
  1331.     MsgBox "An object must be selected first."
  1332. End Sub
  1333. Private Sub btnObjSetSelection_Click()
  1334.     Dim ObjID As Long
  1335.     On Error GoTo ObjNotFoundErr
  1336.     ObjID = InputBox("Enter the ObjID of the object you wish to select.")
  1337.     F1Book1.ObjSetSelection ObjID
  1338.     Exit Sub
  1339. ObjNotFoundErr:
  1340.     MsgBox "That object was not found."
  1341. End Sub
  1342. Private Sub btnObjText_Click()
  1343.     Dim ObjID As Long
  1344.     On Error GoTo ObjNotFoundErr
  1345.     ObjID = F1Book1.ObjSelection(0)
  1346.     F1Book1.ObjText(ObjID) = InputBox("Change the text from " & F1Book1.ObjText(ObjID) & " to:")
  1347.     Exit Sub
  1348. ObjNotFoundErr:
  1349.     MsgBox "A Checkbox or button object must be selected."
  1350. End Sub
  1351. Private Sub btnObjValue_Click()
  1352.     Dim ObjID As Long
  1353.     On Error GoTo ObjNotFoundErr
  1354.     ObjID = F1Book1.ObjSelection(0)
  1355.     F1Book1.ObjValue(ObjID) = InputBox("Change the text from " & F1Book1.ObjValue(ObjID) & " to:")
  1356.     Exit Sub
  1357. ObjNotFoundErr:
  1358.     MsgBox "A Checkbox or Combobox object must be selected."
  1359. End Sub
  1360. Private Sub btnObjVisible_Click()
  1361.     Dim ObjID As Long
  1362.     On Error GoTo ObjNotFoundErr
  1363.     ObjID = InputBox("Enter the ObjID of the object you wish to toggle the visible state:")
  1364.     F1Book1.ObjVisible(ObjID) = Not F1Book1.ObjVisible(ObjID)
  1365.     Exit Sub
  1366. ObjNotFoundErr:
  1367.     MsgBox "That object was not found."
  1368. End Sub
  1369. Private Sub btnOval_Click()
  1370.     F1Book1.Mode = F1ModeOval
  1371. End Sub
  1372. Private Sub btnPolygon_Click()
  1373.     F1Book1.Mode = F1ModePolygon
  1374. End Sub
  1375. Private Sub btnRectangle_Click()
  1376.     F1Book1.Mode = F1ModeRectangle
  1377. End Sub
  1378. Private Sub Command1_Click()
  1379.     Dim ObjID As Long
  1380.     On Error GoTo ObjNotFoundErr
  1381.     ObjID = F1Book1.ObjSelection(0)
  1382.     F1Book1.ObjValue(ObjID) = InputBox("Change the text from " & F1Book1.ObjValue(ObjID) & " to:")
  1383.     Exit Sub
  1384. ObjNotFoundErr:
  1385.     MsgBox "A Checkbox or Combobox object must be selected."
  1386. End Sub
  1387. Private Sub mnuOptions_Click()
  1388.     F1Book1.FormatObjectDlg F1AllPages
  1389. End Sub
  1390.